version: '3.9'

services:
  db:
    container_name: bot_db
    image: postgres:alpine
    environment:
      - POSTGRES_USER=${DATABASE_USER}
      - POSTGRES_PASSWORD=${DATABASE_PASSWORD}
      - POSTGRES_DB=${DATABASE_NAME}
      - PGDATA=/var/lib/postgresql/data/pgdata
    ports:
      - "${DATABASE_PORT}:5432"
    env_file:
      - .env
    volumes:
      - ./data:/var/lib/postgresql/data